package com.example.android.ui.system

import android.os.Bundle
import android.view.View
import androidx.fragment.app.viewModels
import com.example.android.databinding.FragmentSystemBinding
import com.zxf.basic.base.VmBindingFragment
import com.zxf.basic.utils.ToastUtils
import dagger.hilt.android.AndroidEntryPoint

@AndroidEntryPoint
class SystemFragment : VmBindingFragment<SystemViewModel, FragmentSystemBinding>(FragmentSystemBinding::inflate) {
    private val viewmodel by viewModels<SystemViewModel>()

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        initViewModel = false
        super.onViewCreated(view, savedInstanceState)
    }

    override fun lazyInit() {
//        vm.getSystemData().observe(this) {
//            ToastUtils.show("体系的size=${it?.size}")
//        }
//        vm.getSystem().observe(this) {
//            ToastUtils.show("体系的size=${it.size}")
//        }
        viewmodel.getSystemInfo().observe(this) {
            ToastUtils.show("体系的size=${it.size}")
        }
    }

    override fun initView() {

    }

    override fun initData() {

    }
}